import { _decorator, Component, Label, Node, Sprite, tween, v3 } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('FightVictory')
export class FightVictory extends Component {
    @property(Label)
    desc:Label
    @property(Sprite)
    arrow:Sprite
    start() {

    }

    open(str:string){
        
        if(str == '士气上升0%' || str == '士气下降0%'){
            this.desc.node.active = false
            this.arrow.node.active = false
        }

        this.desc.string = str
        this.node.scale = v3(2,2,2)
        tween(this.node)
        .to(0.2, {scale:v3(1,1,1)})
        .start()
    }
}


